<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:s="http://jboss.com/products/seam/taglib">
<head>
<script type="text/javascript" src="common/js/jquery-1.2.6.js"></script>
<script src='common/js/jquery.simplemodal.js' type='text/javascript'></script>
<link href="style/seamspace.css" rel="stylesheet" type="text/css" />
<!-- Basic Dialog -->
<link type='text/css' href='style/basic.css' rel='stylesheet'
	media='screen' />
<s:remote include="seamMgr" />
<script type="text/javascript">
	// we will add our javascript code here  

	function sayHelloCallback(result) {
		$("div").append(result.name);
		alert(result.name);
	}
	function closeModal() {
		$.modal.close()
	}

	$(document).ready(
			function() {
				$("a").click( function() {

					//alert("Hello world!");
						var name = prompt("What is your name?");
						Seam.Component.getInstance("seamMgr").getUser(name,
								sayHelloCallback);

						$('#basicModalContent').modal(); // jQuery object; this demo

						$.modal(document.getElementById('basicModalContent')); // DOM

						$.modal('<p><b>HTML</b> elements</p>'); // HTML

					});

				$('#basicModal input:eq(0)').click( function(e) {
					e.preventDefault();
					$('#basicModalContent').modal();
				});

			});
</script>
<title>jqueryDemo</title>
</head>
<body>
<div id="haha"></div>

<a href="">Link</a>
<div id='basicModal'>
<h2>Basic Modal Dialog</h2>
<p>A basic modal dialog with minimal styling and without any
additional settings. There are a few CSS attributes set internally by
SimpleModal, however, SimpleModal relies mostly on external CSS for the
look and feel.</p>
<input type='button' name='basic' value='Demo' class='demo' /></div>
<div id="basicModalContent" style='display: none'>
<h1>登陆</h1>
<div id="register">
<div class="registerHeader">轻轻一点，立即进入AffectU全球领先的在线工作平台！</div>
<h:form styleClass="register">
	<s:validateAll>
		<div class="formRow"><h:outputLabel for="email">电子邮箱<em>*</em>
		</h:outputLabel> <h:inputText id="email" value="#{user.email}" required="true"
			styleClass="wide" />
		<div class="validationError"><h:message for="email" /></div>
		</div>

		<div class="formRow"><h:outputLabel for="password">密码<em>*</em>
		</h:outputLabel> <h:inputSecret id="password" value="#{user.password}" required="true" />
		<div class="validationError"><h:message for="password" /></div>
		</div>
	</s:validateAll>

	<div class="buttons"><h:commandButton value="登陆"
		action="#{userAction.login}" styleClass="registerButton" /></div>

</h:form> <br class="clear" />
</div>
</div>
</body>
</html>
